import Vue from 'vue'
import Router from 'vue-router'
import Head from '@/views/homePage/index.vue'

Vue.use(Router)

const _import = require('./import-' + process.env.NODE_ENV)

export default new Router({
	routes: [
		{ path: '/', name: 'Head', component: Head },
		{ path: '/order', component: _import('order/order'), name: 'order', meta: { title: '订单中心', isTab: true } },
		{ path: '/shoppingCar', component: _import('shoppingCar/index'), name: 'shoppingCar', meta: { title: '购物车' } },
		{ path: '/empty', component: _import('order/empty'), name: 'empty', meta: { title: '页面跳转' } },
		{ path: '/orderDetails', component: _import('order/orderDetails'), name: 'orderDetails', meta: { title: '订单详情' } },
		{ path: '/payment', component: _import('homePage/payment'), name: 'payment', meta: { title: '支付订单' } },
		{ path: '/pintuangouDet', component: _import('homePage/pintuangouDet'), name: 'productDetails', meta: { title: '商品详情' } },
		{ path: '/productDetails', component: _import('homePage/productDetails'), name: 'productDetails', meta: { title: '商品详情' } },
		{ path: '/productList', component: _import('homePage/productList'), name: 'productList', meta: { title: '商品列表' } },
		{ path: '/productList2', component: _import('homePage/productList2'), name: 'productList2', meta: { title: '商品列表' } },
		{ path: '/placeOrder', component: _import('homePage/placeOrder'), name: 'placeOrder', meta: { title: '提交订单' } },
		{ path: '/login', component: _import('login/login'), name: 'login', meta: { title: '登录' } },
		{ path: '/xieyi', component: _import('login/xieyi'), name: 'login', meta: { title: '用户协议' } },
		{ path: '/yinsi', component: _import('login/yinsi'), name: 'login', meta: { title: '隐私政策' } },
		{ path: '/shopCartOrder', component: _import('shoppingCar/shopCartOrder'), name: 'login', meta: { title: '提交订单' } },
		{ path: '/vueMchat', component: _import('homePage/vueMchat'), name: 'login', meta: { title: '交流' } },
		{ path: '/goodsDet', component: _import('homePage/goodsDet'), name: 'login', meta: { title: '商品详情' } },
		{ path: '/dianpu', component: _import('homePage/dianpu'), name: 'login', meta: { title: '店铺' } },
		{ path: '/helpCenter', component: _import('homePage/helpCenter'), name: 'login', meta: { title: '帮助中心' } },
	]
})
